package com.aididi.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @Auther: zx.xu
 * @Description:
 */
@Data
@TableName("sys_auth")
public class SysAuth implements Serializable{

    private static final long serialVersionUID = 1L;

    /**
     * 权限ID
     */
    @TableId
    private Long id;

    /**
     * 权限名称
     */
    private String name;

    /**
     * 权限标识
     */
    private String permission;

    /**
     * 父菜单ID，一级菜单为0
     */
    private Long parentId;

    /**
     * 排序
     */
    private Integer orderNum;

    @TableField(exist = false)
    private List<SysAuth> children = new ArrayList<>();
}
